Skip to content

Pin dependencies to non-breaking version ranges#2773

Merged
PCManticore merged 1 commit into
pylint-dev:masterfrom
jab:patch-1
Feb 28, 2019
Merged

Pin dependencies to non-breaking version ranges#2773
PCManticore merged 1 commit into
pylint-dev:masterfrom
jab:patch-1

Conversation

@jab
Copy link
Copy Markdown
Contributor

@jab jab commented Feb 27, 2019

Pylint currently specifies unbounded versions of its dependencies. Assuming semver-compliant dependencies, this is dangerous because from one day to the next, your users can end up transitively picking up a breaking version of your dependencies. (This just happened to me via astroid.*)

This pins your dependencies within non-breaking version ranges to hopefully protect your users from breaking this way.

* The fact that astroid's minor version bump was a breaking change goes to show this isn't foolproof, but it's strictly an improvement over the status quo of having no bound whatsoever.

Comment thread pylint/__pkginfo__.py
version = string_version

install_requires = ["astroid>=2.2.0", "isort >= 4.2.5", "mccabe"]
install_requires = ["astroid>=2.2.0,<3", "isort>=4.2.5,<5", "mccabe>=0.6,<0.7"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mccabe is pinned more strictly (to within the same minor version) since it is a major version 0 package, which semver says may make breaking releases between minor versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out astroid 2.2.0 was a breaking release over 2.1.0. Pinned to 2.1.0 in #2774.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 89.728% when pulling 65fd34f on jab:patch-1 into dbc1df3 on PyCQA:master.

@PCManticore
Copy link
Copy Markdown
Contributor

Thanks @jab !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants